package com.snakerflow.app.notice.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.snakerflow.framework.security.entity.SecurityEntity;
import com.snakerflow.framework.security.entity.User;

/**
 * 包名称： com.snakerflow.app.notice.entity 类名称：Notice<br/>
 * 类描述：<br/>
 * 
 * @version <br/>
 *          TODO
 */
@Entity
@Table(name = "OA_NOTICE")
public class Notice extends SecurityEntity {
	/**
	 * @Fields title 标题
	 */
	private String title;
	/**
	 * @Fields context 内容
	 */
	private String context;
	
	@Column(name="create_date",updatable=false)
	private Date createDate;

	/**
	 * 创建人
	 */
	private User user;

	@OneToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "title", nullable = false, unique = true)
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "context")
	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}

}
